.hero
  section.section: .container
    p.heading= link_to "Ruby Toolbox UI Components Styleguide", "/pages/components"
    h2= current_page.split("/").last.humanize

= component_example "Project Health tags" do
  .project-health-tags
    = project_health_tag Project::Health::HEALTHY_STATUS
    - Project::Health::Checks::ALL.each do |status|
      = project_health_tag status

= component_example "Tag list shortcut helper" do
  .content
    markdown:
      Use `project_health_tags(project)` to render the full list of health tags without iterating over individual items

  = project_health_tags Project.new

= component_example "Reference to bugfix forks" do
  .content
    markdown:
      Projects that are a [bugfix fork](/pages/docs/features/bugfix_forks)
      get an additional badge linking the documentation and the
      suspected originating gem.

  = project_health_tags Project.new(bugfix_fork_of: "rails")

= component_example "Tiny tag list with hover dropdown"
  .content
    markdown:
      When available space is very limited, the "worst" status health indicator can be shown only, linking to the project
      details view.

      Note: This [originally featured a hoverable dropdown] (https://github.com/rubytoolbox/rubytoolbox/pull/417), but this broke responsive behaviour of the project comparison table this is used within, so it's just a badge now.

  - Project.for_display.order(score: :desc).limit(10).each do |project|
    = small_health_indicator project

  - Project.for_display.where("rubygems.latest_release_on < ?", 5.years.ago).order(score: :desc).limit(10).each do |project|
    = small_health_indicator project
